package com.diankangwo.factory.service.impl;

import com.diankangwo.factory.dao.TdOrderShoppingcartMapper;
import com.diankangwo.factory.entity.TdOrderShoppingcart;
import com.diankangwo.factory.service.TdOrderShoppingcartServices;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service("TdOrderShoppingcartServices")
public class TdOrderShoppingcartServicesImpl implements TdOrderShoppingcartServices {

    @Autowired
    private TdOrderShoppingcartMapper tdOrderShoppingcartMapper;

    @Override
    @Transactional
    public int insert(TdOrderShoppingcart record) {
        return tdOrderShoppingcartMapper.insert(record);
    }

    @Override
    @Transactional
    public int insertSelective(TdOrderShoppingcart record) {
        return tdOrderShoppingcartMapper.insertSelective(record);
    }

    @Override
    public List<TdOrderShoppingcart> selectByOrderId(Integer orderId) {
        return tdOrderShoppingcartMapper.selectByOrderId(orderId);
    }

    @Override
    public List<TdOrderShoppingcart> selectByOrShoppingId(Integer id) {
        return tdOrderShoppingcartMapper.selectByOrShoppingId(id);
    }
}
